package ch1.di;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service //使用@Service声明UseFunctionService类是Spring管理的一个Bean
public class UseFunctionService {

    @Autowired  //使用@Autowired将FunctionService实体Bean注入到UseFunctionService
    FunctionService functionService;

    public String SayHello(String word){
        return functionService.sayHello(word);
    }
}
